﻿
CREATE PROCEDURE [dbo].[P_OBTERLISTA_T09_SETOR]
	@cd_setor [int]
   ,@ds_setor [varchar](50)
   
AS
BEGIN
	SELECT
	T.cd_setor
    ,T.ds_setor
    
  FROM T09_SETOR T
  WHERE
    (cd_setor = @cd_setor OR @cd_setor IS NULL)
    AND (ds_setor like '%' + @ds_setor + '%' OR @ds_setor IS NULL)
    
END